package org.mushroomdb.lock.locktypes;

/**
 * @author Tomas
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class PageLock extends Lock {
    private long pageId ;

    /**
     * @param id
     * @param exclusive
     * @param userId
     */
    public PageLock(long id, boolean exclusive, String userId, long pageId) {
        super(id, exclusive, userId);
        this.pageId=pageId;
    }
    
    /**
     * @return Returns the pageId.
     */
    public long getPageId() {
        return this.pageId;
    }
    /**
     * @param pageId The pageId to set.
     */
    public void setPageId(long pageId) {
        this.pageId = pageId;
    }
    
    public boolean isPage() {
         return true;
    }

    
    public boolean isTable() {
        return false;
    }

    
    public boolean isRegister() {
        return false;
    }
   

}
